package com.company.calendar.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.company.calendar.entity.ImportHistory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 导入历史Mapper接口
 * 
 * @author System
 * @since 1.0.0
 */
@Mapper
public interface ImportHistoryMapper extends BaseMapper<ImportHistory> {
    
    /**
     * 根据公司ID查找导入历史
     */
    @Select("SELECT * FROM import_history WHERE company_id = #{companyId} ORDER BY import_time DESC")
    List<ImportHistory> findByCompanyIdOrderByImportTimeDesc(@Param("companyId") Long companyId);
}
